Skip to content

Better photos#1085

Merged
wbazant merged 2 commits into
mainfrom
issue-1080
May 21, 2026
Merged

Better photos#1085
wbazant merged 2 commits into
mainfrom
issue-1080

Conversation

@wbazant

@wbazant wbazant commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Closes #1080

I've assembled an experimental setup of objects of varying colors in diffuse lighting, took two pictures, and uploaded: https://falling-fruit-web.pages.dev/locations/1989825/@55.8258624,-4.2610278,18z .

I can tell the better one from the lighting on the window frame for example. Sizes are 162kb and 460kb, so still the same ballpark - I think the slow uploads I originally tried to fix were from pictures weighing a few megabytes. Agreeing with you @ezwelty that the resizing was too aggressive, thanks for pointing it out!

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 19, 2026

Copy link
Copy Markdown

Deploying falling-fruit-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2debc8d
Status:⚡️  Build in progress...

View logs

@ezwelty

ezwelty commented May 21, 2026

Copy link
Copy Markdown
Collaborator

@wbazant To match the legacy website, the new API produces three sizes: 100 px (thumb), 300 px (medium), 2048 px ("original"), which are uploaded to Amazon S3. So 2048 px would be a reasonable max size for the frontend. Did you feel that 0.8 → 0.85 was worth it?

https://github.com/falling-fruit/falling-fruit-api/blob/bbe8db0b87edec9e80e7eb3f750d23ccce953296/helpers.js#L450

The reason the medium often looks fuzzy in the drawer/sidebar is that these are often wider (average width for phones nowadays is ~400 px) and, if the image is vertical, it is 300 px tall so quite a bit less than 300 px wide.

@wbazant

wbazant commented May 21, 2026

Copy link
Copy Markdown
Collaborator Author

Did you feel that 0.8 → 0.85 was worth it?

I've not tried to compare on compression quality, just took a chatgpt recommendation. We can go with just the max width change!

@wbazant wbazant merged commit 9dfa478 into main May 21, 2026
2 of 3 checks passed
@wbazant wbazant deleted the issue-1080 branch May 21, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compress less for better photo quality

2 participants